const fs = require('fs');

fs.rename('./520fs.js', '202005520fs.js', (err) => {
  if(err) {
    throw err
  }else {
    console.log('rename success!!!')
  }
})
// ======================================
try {
  let res = fs.renameSync('./0521write.js', './521write.js');
  console.log(res)
} catch (error) {
  throw error
}